﻿using System;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;

namespace SceneAssist
{
	// Token: 0x0200051D RID: 1309
	public class SceneManager : MonoBehaviour
	{
		// Token: 0x170003E8 RID: 1000
		// (get) Token: 0x06002141 RID: 8513 RVA: 0x000CBF60 File Offset: 0x000CA160
		public Image ImageNowLoading
		{
			get
			{
				return this.imageNowLoading;
			}
		}

		// Token: 0x170003E9 RID: 1001
		// (get) Token: 0x06002142 RID: 8514 RVA: 0x000CBF68 File Offset: 0x000CA168
		public Slider SliderProgress
		{
			get
			{
				return this.sliderProgress;
			}
		}

		// Token: 0x170003EA RID: 1002
		// (get) Token: 0x06002143 RID: 8515 RVA: 0x000CBF70 File Offset: 0x000CA170
		public Image ImageLoadingAnime
		{
			get
			{
				return this.imageLoadingAnime;
			}
		}

		// Token: 0x170003EB RID: 1003
		// (set) Token: 0x06002144 RID: 8516 RVA: 0x000CBF78 File Offset: 0x000CA178
		public bool NowLoadingActive
		{
			set
			{
				if (this.imageNowLoading && this.imageNowLoading.gameObject.activeSelf != value)
				{
					this.imageNowLoading.gameObject.SetActive(value);
				}
			}
		}

		// Token: 0x170003EC RID: 1004
		// (get) Token: 0x06002146 RID: 8518 RVA: 0x000CBFF0 File Offset: 0x000CA1F0
		// (set) Token: 0x06002145 RID: 8517 RVA: 0x000CBFB4 File Offset: 0x000CA1B4
		public bool ProgressActive
		{
			get
			{
				return this.sliderProgress != null && this.sliderProgress.IsActive();
			}
			set
			{
				if (this.sliderProgress && this.sliderProgress.gameObject.activeSelf != value)
				{
					this.sliderProgress.gameObject.SetActive(value);
				}
			}
		}

		// Token: 0x170003ED RID: 1005
		// (set) Token: 0x06002147 RID: 8519 RVA: 0x000CC014 File Offset: 0x000CA214
		public bool LoadingAnimeActive
		{
			set
			{
				if (this.imageLoadingAnime && this.imageLoadingAnime.enabled != value)
				{
					this.imageLoadingAnime.enabled = value;
				}
			}
		}

		// Token: 0x170003EE RID: 1006
		// (set) Token: 0x06002148 RID: 8520 RVA: 0x000CC044 File Offset: 0x000CA244
		public bool Active
		{
			set
			{
				if (this.imageNowLoading && this.imageNowLoading.gameObject.activeSelf != value)
				{
					this.imageNowLoading.gameObject.SetActive(value);
				}
				if (this.sliderProgress && this.sliderProgress.gameObject.activeSelf != value)
				{
					this.sliderProgress.gameObject.SetActive(value);
				}
				if (this.imageLoadingAnime && this.imageLoadingAnime.enabled != value)
				{
					this.imageLoadingAnime.enabled = value;
				}
			}
		}

		// Token: 0x170003EF RID: 1007
		// (get) Token: 0x06002149 RID: 8521 RVA: 0x000CC0EC File Offset: 0x000CA2EC
		// (set) Token: 0x0600214A RID: 8522 RVA: 0x000CC114 File Offset: 0x000CA314
		public float ProgressValue
		{
			get
			{
				return (!(this.sliderProgress != null)) ? 1f : this.sliderProgress.value;
			}
			set
			{
				if (this.sliderProgress)
				{
					this.sliderProgress.value = value;
				}
			}
		}

		// Token: 0x170003F0 RID: 1008
		// (set) Token: 0x0600214B RID: 8523 RVA: 0x000CC134 File Offset: 0x000CA334
		public float NowLoadingAlpha
		{
			set
			{
				if (this.imageNowLoading)
				{
					Color color = this.imageNowLoading.color;
					color.a = value;
					this.imageNowLoading.color = color;
				}
			}
		}

		// Token: 0x170003F1 RID: 1009
		// (set) Token: 0x0600214C RID: 8524 RVA: 0x000CC174 File Offset: 0x000CA374
		public float LoadingAnimeAlpha
		{
			set
			{
				if (this.imageLoadingAnime)
				{
					Color color = this.imageLoadingAnime.color;
					color.a = value;
					this.imageLoadingAnime.color = color;
				}
			}
		}

		// Token: 0x0600214D RID: 8525 RVA: 0x000CC1B4 File Offset: 0x000CA3B4
		public void SetAlpha(float _a)
		{
			this.NowLoadingAlpha = _a;
			this.LoadingAnimeAlpha = _a;
		}

		// Token: 0x0600214E RID: 8526 RVA: 0x000CC1C4 File Offset: 0x000CA3C4
		private void Reset()
		{
			this.imageNowLoading = base.GetComponentsInChildren<Image>().FirstOrDefault((Image p) => p.name == "NowLoading");
			this.sliderProgress = base.GetComponentsInChildren<Slider>().FirstOrDefault((Slider p) => p.name == "Progress");
			this.imageLoadingAnime = base.GetComponentsInChildren<Image>().FirstOrDefault((Image p) => p.name == "LoadingAnime");
		}

		// Token: 0x040022B9 RID: 8889
		[SerializeField]
		private Image imageNowLoading;

		// Token: 0x040022BA RID: 8890
		[SerializeField]
		private Slider sliderProgress;

		// Token: 0x040022BB RID: 8891
		[SerializeField]
		private Image imageLoadingAnime;
	}
}
